package topday1_9.mxdx9;

/**
 * @Auther:小陈的Java
 * 定义USB接口
 * jdk1.7 接口
 * 1.只能定义 公有的静态常量
 * 2.只能定义公有抽象方法
 */
public interface USBInterface {
    public static final String CODE = "矩形USB接口";
    int DIAN_LIU = 5;
    public abstract void out();
    void input();
    //public USBInterface() {}
    public static void main(String[] args) {
        USBInterface shuBiao = new ShuBiao();
        shuBiao.input();
        shuBiao.out();
        USBInterface jianPan = new jianPan();
        jianPan.input();
        jianPan.out();
    }
}
class ShuBiao implements USBInterface {
    @Override
    public void out() {
        System.out.println("输出鼠标左键右键指令");
    }
    @Override
    public void input() {
        System.out.println("输入"+USBInterface.DIAN_LIU+"电流");
    }
}
class jianPan implements USBInterface {
    @Override
    public void out() {
        System.out.println("输出键盘按键指令");
    }
    @Override
    public void input() {
        System.out.println("输入"+USBInterface.DIAN_LIU+"电流");
    }
}
